//
//  HotShopViewModel.swift
//  zhihuifan
//
//  Created by apple on 2017/9/7.
//  Copyright © 2017年 youyou. All rights reserved.
//

import UIKit
import YYModel
class HotShopViewModel{
   lazy var hotShopModelList:[HotShopModel] = [HotShopModel]()
    //加载数据
    func loadHotShopData(completion:@escaping (_ isSuccess:Bool)->()){
        HBJNetworkManager.shared.loadHotShop { (isSuccess, list) in
            if isSuccess {
                for dic in list ?? []{
                    guard let hotshopModel = HotShopModel.yy_model(with: dic) else {
                        return
                    }
                    self.hotShopModelList.append(hotshopModel)
                }
             completion(true)
            }
            
        }
    }
}
